package com.dbuil.bleshoes.ui.fragment;

import android.widget.TextView;

import com.blankj.utilcode.util.LogUtils;
import com.dbuil.bleshoes.R;
import com.dbuil.bleshoes.base.BaseFragment;
import com.dbuil.bleshoes.utils.CountTimerUtil;

import butterknife.BindView;

public class RunFragment extends BaseFragment {
    @BindView(R.id.tv_number_anim)
    TextView tvNumberAnim;

    @Override
    public int getLayoutId() {
        return R.layout.fragment_run;
    }

    @Override
    public void initImmersionBar() {

    }

    @Override
    public void initData() {
        super.initData();
        daojishi();


    }

    private void daojishi() {
        //显示倒计时
        CountTimerUtil.start(tvNumberAnim, new CountTimerUtil.AnimationState() {
            @Override
            public void start() {

            }

            @Override
            public void repeat() {

            }

            @Override
            public void end() {
               LogUtils.i("倒计时结束了");

            }
        });
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if (hidden) {
            LogUtils.i("run隐藏了");
        } else {
            LogUtils.i("run显示了");
            daojishi();
        }

    }


}
